<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>

<html>
    <head>
		<%@ include file="/WEB-INF/views/include/common.jsp" %>
		<meta name="AUTHOR" content="QroTech Inc." />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
		<meta http-equiv="PRAGMA" content="NO-CACHE">
		<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>큐로넷::위치관제시스템</title>
		
		<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
		<link rel="stylesheet" href="${cssUrl}/header-1.css" type="text/css" />
		<link rel="stylesheet" href="${cssUrl}/footer.css" type="text/css" />
		<link rel="stylesheet" href="${cssUrl}/fancy_table.css" type="text/css" />
		<link rel="stylesheet" href="${cssUrl}/menu.css" type="text/css" />
		<link rel="stylesheet" href="${cssUrl}/table.css" type="text/css" />
		<link rel="stylesheet" href="${cssUrl}/button.css" type="text/css" />
		<link rel="stylesheet" href="${cssUrl}/L-200.css" type="text/css" />
		<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
		<script src="${jsUrl}/L-200.js"></script>
		<style>
		.backgroundAgree{
		background-color:white;
		}
		.backgroundAgree:after{
		opacity: 0.5;	
		}
		.agreeContents{
		  position:relative;
		  top:50px;
		  border:5px solid #888;
		  -moz-border-radius: 5px;
		  border-radius: 5px;
		  margin-left: auto;
		  margin-right: auto;
		}
		</style>
<script language="javascript">
		var _this = this;
		$(document).ready(function(){
		
			<c:if test="${agreed == 'F'}" var="result">			
			agreementDialog();
			</c:if>
		});
		
		<c:if test="${agreed == 'F'}" var="result">
		$(window).resize(function(){
			
			agreementDialog();
			
		});
		
		function agreementDialog(){
			$('#agreement').height($(window).height());
			$('#agreement').width($(window).width());
			$('#agreement').show();
			
		}

		function iAgree(){
			if($('#agree1').is(':checked')&&$('#agree2').is(':checked')&&$('#agree3').is(':checked')){
				
				var url = '/dashBoard/agree', param=null;
				AjaxPost(url, param, function(data){
	    		
					$('#agreement').hide();	
	    		});
			}else{
				alert('위치정보관리에 대한 법률과 개인정보보호 등의 관련 법령에 따라 아래 사항에 동의하셔야 계속 진행할 수 있습니다.');
			}
			
		}
		</c:if>
		
</script>


    </head>
    <body>
    	<div class="headerContent">
	
		<div class="pageHeader">
			<%@ include file="/WEB-INF/views/include/logoLink.jsp" %>
			<div id="pageNav">
				<ul>
					<%@ include file="/WEB-INF/views/include/mainNaviStyle2.jsp" %>
				</ul>
			</div>
			<div id="pageNavRight">
				<%@ include file="/WEB-INF/views/include/titleLink.jsp" %>
			</div>
		</div>
			<div class="header_line"></div>
		</div><!--header end-->	
		
        	
		
		<div class="mainContent">	
			<div class="L200">
				<div class="top">
					<div class="top-left">
						<img src="${imgUrl}/main_image1.png"/>
					</div>
					<div class="top-right">
						<div class="totalcar-status">
							<div class="title redLetter">전체차량운행현황 <a class="button1" href="/totalCarListMain">상세보기</a></div>
							<div class="each-box">
								<ul>
									<li><img src="${imgUrl}/main_allcar_01.png"/></li>
									<li class="right-border">전체회사차량</li>
									<li class="font20"><fmt:formatNumber type="number" maxFractionDigits="3" value="${totalCar}" />대</li>
								</ul>
							</div>
							<div class="each-box">
								<ul>
									<li><img src="${imgUrl}/main_allcar_02.png"/></li>
									<li class="right-border">현재운행차량</li>
									<li class="font20"><fmt:formatNumber type="number" maxFractionDigits="3" value="${nowRunCar}" />대</li>
								</ul>
							</div>
							<div class="each-box">
								<ul>
									<li><img src="${imgUrl}/main_allcar_03.png"/></li>
									<li class="right-border">금일운행거리</li>
									<li class="font20"><fmt:formatNumber type="number" maxFractionDigits="3" value="${todayDistance}" />Km</li>
								</ul>
							</div>
							<div class="each-box">
								<ul>
									<li><img src="${imgUrl}/main_allcar_04.png"/></li>
									<li class="right-border">금일운행시간</li>
									<li class="font20"><fmt:formatNumber type="number" maxFractionDigits="3" value="${totalRunTime}" />분</li>
								</ul>
							</div>
							<div class="each-box">
								<ul>
									<li><img src="${imgUrl}/main_allcar_05.png"/></li>
									<li class="right-border">관심지역진입</li>
									<li class="font20"><fmt:formatNumber type="number" maxFractionDigits="3" value="${checkAreaEnterCnt}" />회</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<div class="bottom">
					<div class="bottom-left">
						<div class="title">공지사항 <a href="/helper/helperNoticeMain" class="cross-button"><img src="${imgUrl}/cross-button.png"/></a></div>
						<div class="totalcar-status" style="margin:0 10px 10px 10px;">
							<table class="info-table" style="table-layout:fixed;">
								
								
								
								<c:choose>
							       <c:when test="${empty publicList}">
							           <td>공지사항이 없습니다.</td>
									   <td class="width-td"></td>
							       </c:when>
							       <c:otherwise>
							          <c:forEach var="pub" items="${publicList}">
										<tr onclick="location.href='/helper/helperNoticeView?textID=${pub.textID}'" style="cursor:pointer;">
											<td style="overflow:hidden;white-space: nowrap;"><c:out value="${pub.title }"/></td>
											<td class="width-td"><fmt:formatDate value="${pub.regiTime }" pattern="yyyy.MM.dd" /></td>
										</tr>
								      </c:forEach>
							       </c:otherwise>
							   </c:choose>
								
							</table>
						</div>
					</div>
					<div class="bottom-middle">
						<div class="title">나의 문의사항 <a href="/helper/helperQnaListMain" class="cross-button"><img src="${imgUrl}/cross-button.png"/></a></div>
						<div class="totalcar-status" style="margin:0 10px 10px 10px;">
							<table class="info-table" style="table-layout:fixed;">
								<c:choose>
							       <c:when test="${empty qnaList}">
							           <td>문의사항이 없습니다.</td>
									   <td class="width-td"></td>
							       </c:when>
							       <c:otherwise>
							          
										<c:forEach var="pub" items="${qnaList}">
										<tr onclick="location.href='/helper/helperQnaView?textID=${pub.textID}'" style="cursor:pointer;">
											<td style="overflow:hidden;white-space: nowrap;">
											<c:choose>
										       <c:when test="${pub.replyNum == 0}">
										       </c:when>
										       <c:otherwise>
										          <span class='response'> RE </span> 
										       </c:otherwise>
										   </c:choose>
											<c:out value="${pub.title }"/></td>
											<td class="width-td"><fmt:formatDate value="${pub.regiTime }" pattern="yyyy.MM.dd" /><c:out value=""/></td>
										</tr>
										</c:forEach> 
							       </c:otherwise>
							   </c:choose>
							
								
							</table>
						</div>
					</div>
					<div class="bottom-right">
							<img src="${imgUrl}/main_image2.png"/>
					</div>
				</div>
			</div>

		
		</div>
		
		<div class="chart_footer">
		    <div class="footerCenter">
		       <span>Copyright ⓒ 2013 Qrotech Co.,Ltd. All rights reserved.</span>
		    </div>
	 	</div>	<!-- footer end-->	
		
		<c:if test="${agreed == 'F'}" var="result">
   
   		
<!-- 최초 로그인 시에 동의서를 받기위해 가장 위에 뜨도록 한다. -->
				
	<div class="agreement backgroundAgree" id="agreement" style="position:absolute;left:0;top:0;z-index:99;display:none;background-color: rgba(255,255,255,0.5)">
		<div class="agreeContents" style="width:960px;height:800px;background-color: rgba(255,255,255,1)">
			<div class="agree-content ">
				<div class="agree-info">
					큐로넷 차량관제시스템에 처음 접속하신 것을 축하드립니다.<br>
					위치정보관리에 대한 법률과 개인정보보호 등의 관련 법령에 따라 아래 사항에 동의하셔야 계속 진행할 수 있습니다.<br>
					내용을 숙지하시고 절차에 따라 동의 여부를 결정하여 주시기 바랍니다.
				</div>
				<p>◆ 위치정보 활용 및 조회에 대한 동의서 <span><input type="checkbox" id="agree1"> 동의함</span></p>
				<div>
					<iframe src="http://www.qronet.co.kr/help/agreement_position.html" scrolling="auto"></iframe>
				</div>
				<p>◆ 개인정보수집 및 활용에 대한 동의서 <span><input type="checkbox" id="agree2"> 동의함</span></p>
				<div>
					<iframe src="http://www.qronet.co.kr/help/agreement_personal.html" scrolling="auto"></iframe>
				</div>
				<p>◆ 개인정보 제3자 제공에 대한 동의서 <span><input type="checkbox" id="agree3"> 동의함</span></p>
				<div>
					<iframe src="http://www.qronet.co.kr/help/agreement_thirdparty.html" scrolling="auto"></iframe>
				</div>
				<div class="button-center"><a class="button3" onclick="iAgree();">동의함</a><a href="<c:url value="j_spring_security_logout"/>" class="button3" >취소</a></div>
			</div>
       	</div> <!-- mainContent end -->
    </div>
       	</c:if>
  </body>
</html>
